package com.flowable.common.enums.definition;


import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil;
import com.common.core.domain.entity.SysUser;
import com.common.utils.bean.BeanUtils;
import com.flowable.common.*;
import com.flowable.controller.oa.vo.AdminUserRespDTO;
import com.flowable.controller.oa.vo.DeptRespDTO;
import com.flowable.controller.oa.vo.UserSimpleBaseVO;
import com.flowable.domain.instance.BpmApprovalDetailRespVO;
import com.flowable.domain.instance.BpmProcessInstanceRespVO;
import com.flowable.domain.vo.BpmProcessDefinitionRespVO;
import com.flowable.domain.vo.BpmTaskRespVO;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import org.flowable.bpmn.model.BpmnModel;
import org.flowable.engine.history.HistoricProcessInstance;
import org.flowable.engine.repository.ProcessDefinition;
import org.flowable.task.api.Task;
import org.flowable.task.api.history.HistoricTaskInstance;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.*;

import static com.common.utils.CollectionUtils.convertList;
import static com.common.utils.CollectionUtils.convertSet;

/**
 * BPM 用户任务的审批人为空时，处理类型枚举
 *
 * @author 芋道源码
 */
@RequiredArgsConstructor
@Getter
public enum BpmUserTaskAssignEmptyHandlerTypeEnum implements IntArrayValuable {

    APPROVE(1), // 自动通过
    REJECT(2), // 自动拒绝
    ASSIGN_USER(3), // 指定人员审批
    ASSIGN_ADMIN(4), // 转交给流程管理员
    ;

    public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmUserTaskAssignEmptyHandlerTypeEnum::getType).toArray();

    private final Integer type;

    @Override
    public int[] array() {
        return ARRAYS;
    }


}
